<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="http://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="root"></div>
</body>
<script>
    Vue.createApp({
        //readonly 拷贝的值不能更改
        setup(props, context) {
            const { reactive, readonly } = Vue
            let content = reactive(['aa'])
            let content2 = readonly(content)
            setTimeout(() => {
                content[0] = 'bb'
                content2[0] = 'cc'
            }, 2000)
            return {
                content, content2
            }
        },
        template: '<div>{{content[0]}}</div>'
    }).mount('#root')
</script>

</html>